package net.sourceforge.wurfl.core.request.normalizer.specific;

import net.sourceforge.wurfl.core.request.normalizer.UserAgentNormalizer;

/**
 * 
 * @author WURFL-PRO SRL, Rome, Italy
 *
 */
public class ChromeNormalizer implements UserAgentNormalizer {
	
	
	
	private String chromeWithMajorVersion(String userAgent) {
		int index = userAgent.indexOf("Chrome" );
		return userAgent.substring(index, index+8);
	}

	/**
	 * Return the Chrome string with the major version  
	 *
	 * @param userAgent
	 * @return String
	 */
	public String normalize(String userAgent) {
		return chromeWithMajorVersion(userAgent);
	}

}
